<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品列表</title>
    <script src="https://unpkg.com/vue@3.2.47/dist/vue.global.js"></script>
</head>
<body>
    <!-- 构建vue项目,写一个商品的列表，里面图片链接等，可以用vue里面的data的数据  -->

    <div class="main" v-cloak   >

        <div class="main_item" v-for="item in people">
            <img :src="item.img" alt="">
            <p class="wenzi">{{item.shangpin}}</p>
            <p class="jiage">{{item.jiege}}</p>
        </div>

    </div>
</body>
<style>

*{
    margin: 0;
    padding: 0;
}

body{
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    
}

.main{
    width: 1200px;
    height: 350px;
    display: flex;
   align-items: center;
   flex-wrap: wrap;
   justify-content: space-around;
}


img{
    width: 350px;
    height: 400px;
}

.wenzi{
    color: blue;
}

.jiage{
    color: red;
}



.main_item{
    text-align: center;
}

</style>
<script>

Vue.createApp({
    data:function(){
        return{
            
            people:[
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"},
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"},
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"},
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"},
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"},
                {img:"https://img1.baidu.com/it/u=4033118807,2976884412&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",shangpin:"野原新之助",jiege:"$无价"}
            ],
        }

    }

}).mount(".main")
</script>
</html>